package com.atguigu.gmall.seckill.service;

import com.atguigu.gmall.mq.seckill.SeckillOrderMsg;
import com.atguigu.gmall.seckill.entity.SeckillGoods;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 *
 */
public interface SeckillGoodsService extends IService<SeckillGoods> {

    List<SeckillGoods> getSeckillGoodsByDayFromCache(String date);

    List<SeckillGoods> getSeckillGoodsByDay(String formatDate);

    void saveToLocalCache(List<SeckillGoods> goodsByDay);

    SeckillGoods getDetail(Long skuId);

    void deduceStock(Long id);

    void saveSeckillOrder(SeckillOrderMsg msg);

    void updateRedisStock(SeckillOrderMsg msg);
}
